package com.unknow.first.dapp.admin.account.service;

import com.unknow.first.dapp.admin.account.mapper.AddressRecharge;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * 充值额外处理器
 */
public interface RechargeHandlerInterface {

//    @Transactional(rollbackFor = Exception.class, propagation = Propagation.MANDATORY)
//    void doBefore(final String address, Integer coinId, final BigDecimal originAmount) throws Exception;

    /**
     * 获取用户名
     * @param address
     * @return
     */
    String getUserName(String address);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.MANDATORY)
    void doAfter(final AddressRecharge addressRecharge) throws Exception;

}
